<template>
  <workflow-detail-dialog v-bind="$attrs" v-on="$listeners" :disabled="true" :showActiveBtn="true">
    <template slot-scope="{data}">
      <my-word :type="data.type_id" :row.sync="data"></my-word>
    </template>
    <template slot-scope="{data}"  slot="form" v-if="isShow">
      <component :is="leftFormComponent" :row.sync="data" ref="leftForm" :disabled="true" style="width:40%; min-width: 300px; max-width: 450px; margin-right: 10px"/>
    </template>
  </workflow-detail-dialog>
</template>
<script>
  import mixincommon from '@/mixins/common'
  import WorkflowDetailDialog from "./WorkflowDetailDialog";
  import MyWord from "./DocumentCase/MyWord";
  export default {
    name:"DetailDocumentDialog",
    components: {MyWord, WorkflowDetailDialog},
    mixins: [mixincommon],
    provide(){
      return{
        realPath:this.path
      }
    },
    data() {
      return {
        leftFormComponent: null,  // 定义组件
        info: {},
        showForm:{//是否显示iframe
          schoolForeign:true,
          schoolDocuments:false
        },
      }
    },
    computed:{
      isShow(){
        return this.showForm[this.activePage]
      }
    },
    created() {
      this.getComponent()
    },
    methods: {
      getComponent() {
        let form = require('@/views/' + this.leftFormPath + '/LeftForm')
        this.leftFormComponent = form.default
      }
    }
  }
</script>
